In an in-vehicle electronic control unit, a microcomputer disposed therein operates with an in-vehicle battery as a power supply.
In the in-vehicle electronic control unit that is required to operate even when an ignition switch is off, that is, in the off-state during which the in-vehicle battery is not changed, particularly when the ignition switch is off, power consumption is required to be reduced as much as possible. For this reason, when given conditions including a condition where the ignition switch is off are satisfied, the operation mode is shifted to a low power consumption operation mode (standby mode or sleep mode) which is smaller in the power consumption than the normal operation mode.
Also, in the in-vehicle electronic control unit, there is required a function of shifting (waking up) the microcomputer to the normal operation mode when some signals are monitored, and the occurrence of a predetermined change in the signals is detected even when the microcomputer is in the low power consumption operation mode.
For example, it is assumed that an analog signal having a voltage value changed according to the amount of operating an operation section such as a brake by a vehicle driver is to be monitored. Then, there is provided a wakeup function of waking up the microcomputer when it is determined that the operation section has been operated upon detecting that a magnitude relation of the analog signal and a reference voltage reaches a predetermined relation (analog signal<reference voltage, or analog signal>reference voltage).
Further, because it is considered that an optimum value of the reference voltage is different in each of the vehicle lines, it is required that a value of the reference voltage used for the wakeup function can be arbitrarily changed.
Under the circumstances, as a technique of realizing the wakeup function, it is proposed that, even when the microcomputer becomes the low power consumption operation mode, the microcomputer is returned to the normal operation mode at regular time intervals, and the analog signal to be monitored is subjected to A/D conversion by means of a built-in A/D converter. The A/D conversion value is compared with a reference voltage corresponding value within a memory. When both of those values satisfy a predetermined relationship, the microcomputer remains in the normal operation mode without returning to the low power consumption operation mode again.
However, in this method, because the microcomputer must be intermittently returned to the normal operation mode even temporarily, the power consumption cannot be sufficiently reduced.
JP 2004-234463A proposes a circuit that cyclically subjects an analog signal to A/D conversion, and compares the A/D conversion value with a value within an expected value register to output a wakeup signal to the CPU when the compared values satisfy a given relationship, in addition to the CPU.
However, in JP 2004-234463A, because the circuit including the A/D converter must be provided in addition to the microcomputer, the circuit scale and the costs increase.